package mercede.allTable;

import mercede.allDTOs.FlightDTO;

import java.io.Serializable;

import javax.persistence.*;


/**
 * The persistent class for the flight database table.
 * 
 */
@Entity
@NamedQueries({@NamedQuery(name="Flight.findAll", query="SELECT f FROM Flight f"),
	@NamedQuery(name="Flight.FIND_BY_DEST", query="SELECT f FROM  Flight f WHERE f.fDestination=:fdestination")})
public class Flight implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int fID;

	private String fDeparture;

	private String fDestination;

	private String fNumber;

	private String fPrice;

	public Flight() {
		super();
	}
	
	public Flight(FlightDTO flightdto)
	{
		this.fDeparture=flightdto.getfDeparture();
		this.fDestination=flightdto.getfDestination();
		this.fNumber=flightdto.getfNumber();
		this.fPrice=flightdto.getfPrice();
		this.fID=flightdto.getfID();
	}
	
	

	public int getFID() {
		return this.fID;
	}

	public void setFID(int fID) {
		this.fID = fID;
	}

	public String getFDeparture() {
		return this.fDeparture;
	}

	public void setFDeparture(String fDeparture) {
		this.fDeparture = fDeparture;
	}

	public String getFDestination() {
		return this.fDestination;
	}

	public void setFDestination(String fDestination) {
		this.fDestination = fDestination;
	}

	public String getFNumber() {
		return this.fNumber;
	}

	public void setFNumber(String fNumber) {
		this.fNumber = fNumber;
	}

	public String getFPrice() {
		return this.fPrice;
	}

	public void setFPrice(String fPrice) {
		this.fPrice = fPrice;
	}

	@Override
	public String toString() {
		return "Flight [fID=" + fID + ", fDeparture=" + fDeparture
				+ ", fDestination=" + fDestination + ", fNumber=" + fNumber
				+ ", fPrice=" + fPrice + "]";
	}
	
	

}